// The Vue build version to load with the `import` command
// (runtime-only or standalone) has been set in webpack.base.conf with an alias.
require('./style/rem.less'); //引入全局的base文件

import Vue from 'vue'
import App from './App'
import router from './router'
import MintUI from 'mint-ui'
import 'mint-ui/lib/style.css'
Vue.use(MintUI);
import axios from 'axios'
import Qs from 'qs'

import Vuex from 'vuex'
import store from './vuex/store'

Vue.use(Vuex);
// import Vconsole from 'vconsole';
// const vConsole = new Vconsole();
// export default vConsole;
Vue.prototype.axios = axios;
Vue.prototype.qs = Qs;

import VueWechatTitle from 'vue-wechat-title';
Vue.use(VueWechatTitle)

Vue.config.productionTip = false
import { Field,Button,DatetimePicker,Actionsheet  } from 'mint-ui';


Vue.component(DatetimePicker.name, DatetimePicker);
Vue.component(Actionsheet.name, Actionsheet);
Vue.component(Button.name, Button);
Vue.component(Field.name, Field);
//vue-clipboard2
import VueClipboard from 'vue-clipboard2'
Vue.use(VueClipboard)


import common from './js/common.js';
Vue.prototype.common = common
/* eslint-disable no-new */
new Vue({
    el: '#app',
    router,
    store,
    props: ['message'],
    components: {App},
    template: '<App/>'
})
// const whiteList = ['/login']  // 路由白名单，不需要登录的路由放在这里面
// router.beforeEach((to,from,next) => {
//     // 监听路由刷新进行跳转
//     window.addEventListener('load',function () {
//         console.log(from.path)
//         console.log(to.path)
//         if (to.path == '/groupwork') {
//             next({ path: '/choice_course' })
//         }
//     })
// })
